﻿
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DataAccess.Models
{
    /// <summary>
    /// 产品列表Model
    /// </summary>
    public class ProductListModel
    {
        /// <summary>
        /// 商品编号
        /// </summary>
        public long auctionId;
      
        /// <summary>
        /// 30天销售量
        /// </summary>
        public int biz30day;

        /// <summary>
        /// 优惠券金额
        /// </summary>
        public float couponAmount;
        
      
        /// <summary>
        /// 产品图片
        /// </summary>
        public string pictUrl;

        
        /// <summary>
        /// 店铺名称
        /// </summary>
        public string shopTitle;

        /// <summary>
        /// 商品标题
        /// </summary>
        public string title;

       

        /// <summary>
        /// 通用佣金比例(最后会换算成最终的佣金)
        /// </summary>
        public string tkRate;

        /// <summary>
        /// 商品所在平台,0(淘宝)1(天猫)
        /// </summary>
        public string userType;
        /// <summary>
        /// 商品最终价格（消费者购买后的价格）zkPrice-couponAmount
        /// </summary>
        public string Price { get; set; }

        /// <summary>
        /// 数据库对应产品类别编码
        /// </summary>
        public int DataTypeID { get; set; }
       
        /// <summary>
        /// 折扣后的价格[卖家实际的价格](不包含优惠券)
        /// </summary>
        public float zkPrice;
         
    }

    public class ProductDetails
    {
        /// <summary>
        /// 商品编号
        /// </summary>
        public long auctionId;

        /// <summary>
        /// 商品地址
        /// </summary>
        public string auctionUrl;

        /// <summary>
        /// 30天销售量
        /// </summary>
        public int biz30day;

        #region 优惠券相关
        /// <summary>
        /// 优惠券编号
        /// </summary>
        public string couponActivityId;

        /// <summary>
        /// 优惠券金额
        /// </summary>
        public float couponAmount;

        /// <summary>
        /// 优惠券总量
        /// </summary>
        public string couponTotalCount;

        /// <summary>
        /// 优惠券剩余数量
        /// </summary>
        //public int couponLeftCount;

        /// <summary>
        /// 优惠券开始时间
        /// </summary>
        public string couponEffectiveStartTime;

        /// <summary>
        /// 优惠券结束时间
        /// </summary>
        public string couponEffectiveEndTime;

     

        /// <summary>
        /// 优惠券地址
        /// </summary>
       // public string couponLink;

   

        #endregion

        /// <summary>
        /// 商品最终价格（消费者购买后的价格）zkPrice-couponAmount
        /// </summary>
        public string Price { get; set; }

        /// <summary>
        /// 产品图片
        /// </summary>
        public string pictUrl;

        /// <summary>
        /// 商品原价
        /// </summary>
        //public float reservePrice;

        /// <summary>
        /// 店铺名称
        /// </summary>
        public string shopTitle;
        /// <summary>
        /// 商品标题
        /// </summary>
        public string title;

        /// <summary>
        /// 折扣后的价格[卖家实际的价格](不包含优惠券)
        /// </summary>
        public float zkPrice;
        /// <summary>
        /// 佣金百分比
        /// </summary>
        public double Rate { get; set; }

        /// <summary>
        /// 通用佣金比例(最后会换算成最终的佣金)
        /// </summary>
        public float tkRate;

        /// <summary>
        /// 商品所在平台,0(淘宝)1(天猫)
        /// </summary>
        public int userType;
         public string Introduce{ get; set; }
       

        /// <summary>
        /// 数据库对应产品类别编码
        /// </summary>
        public int DataTypeID { get; set; }
    }

    [Serializable]
    public class TbkGoods 
    {
        /// <summary>
        /// 商品编号
        /// </summary>
        public long auctionId;

        /// <summary>
        /// 商品地址
        /// </summary>
        public string auctionUrl;

        /// <summary>
        /// 30天销售量
        /// </summary>
        public int biz30day;

        #region 优惠券相关
        /// <summary>
        /// 优惠券编号
        /// </summary>
        public string couponActivityId;

        /// <summary>
        /// 优惠券金额
        /// </summary>
        public float couponAmount;

        /// <summary>
        /// 优惠券总量
        /// </summary>
        public int couponTotalCount;

        /// <summary>
        /// 优惠券剩余数量
        /// </summary>
        public int couponLeftCount;

        /// <summary>
        /// 优惠券开始时间
        /// </summary>
        public string couponEffectiveStartTime;

        /// <summary>
        /// 优惠券结束时间
        /// </summary>
        public string couponEffectiveEndTime;

        /// <summary>
        /// 优惠券使用描述(满100元减3元)
        /// </summary>
        public string couponInfo;

        /// <summary>
        /// 优惠券地址
        /// </summary>
        public string couponLink;

        /// <summary>
        /// 金额达到多少可以使用优惠券
        /// </summary>
        public float couponStartFee;

        #endregion


        #region 高佣计划相关
        /// <summary>
        /// 计划剩余天数(-1没有限制,)
        /// </summary>
        public int dayLeft;

        /// <summary>
        /// 计划编号
        /// </summary>
        public long eventCreatorId;

        /// <summary>
        /// 高佣计划佣金比例(这里是一个判定条件)
        /// </summary>
        public float eventRate;

        #endregion

        /// <summary>
        /// 是否为定向计划,0通用(鹊桥)计划,是为1定向计划
        /// </summary>
        public int includeDxjh;

        /// <summary>
        /// 商品所属类别
        /// </summary>
        public long leafCatId;

        /// <summary>
        /// 卖家昵称
        /// </summary>
        public string nick;

        /// <summary>
        /// 产品图片
        /// </summary>
        public string pictUrl;

        /// <summary>
        /// 商品原价
        /// </summary>
        public float reservePrice;

        /// <summary>
        /// 卖家编号
        /// </summary>
        public long sellerId;

        /// <summary>
        /// 店铺名称
        /// </summary>
        public string shopTitle;

        /// <summary>
        /// 商品标题
        /// </summary>
        public string title;

        /// <summary>
        /// 第三方佣金比例(内容为空,高佣计划这里有值,这里也可以进行高佣计划的判定)
        /// </summary>
        public float tk3rdRate;

        /// <summary>
        /// 淘客佣金(根据具体的类型来计算)
        /// </summary>
        public float tkCommFee;

        /// <summary>
        /// 通用佣金比例(最后会换算成最终的佣金)
        /// </summary>
        public float tkRate;

        /// <summary>
        /// 商品所在平台,0(淘宝)1(天猫)
        /// </summary>
        public int userType;

        /// <summary>
        /// 折扣后的价(不包括优惠券)
        /// </summary>
        public float zkPrice;

        /// <summary>
        /// 定向计划列表
        /// </summary>
        public List<tkSpecialCampaign> tkSpecialCampaignIdRateMap;

        /// <summary>
        /// 申请的定向计划编号
        /// </summary>
        public int applytkSpecialCampaign;

        /// <summary>
        /// 走高佣活动还是定向计划(0普通,1定向计划,2高佣活动)
        /// </summary>
        public int apply_QQHD_or_SpecialCampaign;

        /// <summary>
        /// 同步时间(如果佣金,价格,定向计划,优惠券额度,优惠券ID发生变化这里才算同步)
        /// </summary>
        public DateTime synchro_date;

        /// <summary>
        /// 数据库对应产品类别编码
        /// </summary>
        public int DataTypeID { get; set; }
    }

    /// <summary>
    /// 定向计划
    /// </summary>
    public class tkSpecialCampaign
    {
        /// <summary>
        /// 定向计划编号
        /// </summary>
        public int tkSpecialCampaignID;

        /// <summary>
        /// 定向计划佣金比例
        /// </summary>
        public float tkSpecialCampaignMap;
    }
}
